package com.learn.project.controller;

import com.learn.project.domain.JobData;
import com.learn.project.mapper.JobDataMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lijiajun
 * @date 2023/11/21
 */
@RestController
public class ProjectController {

    @Resource
    private JobDataMapper jobDataMapper;

    @GetMapping
    public List<JobData> getJobDataList() {
        return this.jobDataMapper.getJobDataList();
    }

    @PostMapping
    public void saveJobData(@RequestBody JobData data) {
        this.jobDataMapper.saveJobData(data);
    }
}